package com.acegear.horizon.domain.events;


import com.acegear.horizon.domain.models.constraint.UserPostType;
import com.acegear.horizon.domain.models.jpa.ContentPart;

import java.util.List;

/**
 * Created by guoweike on 17/3/8.
 */
public class UserPostModifiedEvent extends BaseEvent {


  private Long userId;

  private Long clubId;

  private Long postId;

  private UserPostType postType;

  private PostEventType eventType;

  private List<ContentPart> contentPartList;

  public UserPostModifiedEvent(Long userId, Long clubId, Long postId, UserPostType postType,
                               PostEventType eventType, List<ContentPart> contentPartList) {
    this.userId = userId;
    this.clubId = clubId;
    this.postId = postId;
    this.postType = postType;
    this.eventType = eventType;
    this.contentPartList = contentPartList;
    genEventId();
  }

  public UserPostModifiedEvent() {
  }


  public Long getUserId() {
    return userId;
  }

  public void setUserId(Long userId) {
    this.userId = userId;
  }

  public Long getClubId() {
    return clubId;
  }

  public void setClubId(Long clubId) {
    this.clubId = clubId;
  }

  public UserPostType getPostType() {
    return postType;
  }

  public void setPostType(UserPostType postType) {
    this.postType = postType;
  }

  public Long getPostId() {
    return postId;
  }

  public void setPostId(Long postId) {
    this.postId = postId;
  }


  public PostEventType getEventType() {
    return eventType;
  }

  public void setEventType(PostEventType eventType) {
    this.eventType = eventType;
  }

  public List<ContentPart> getContentPartList() {
    return contentPartList;
  }

  public void setContentPartList(List<ContentPart> contentPartList) {
    this.contentPartList = contentPartList;
  }

  @Override
  public String routingKey() {
    return "horizon.domain.user.post.update";
  }
}
